package com.pll.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName RequestDto
 * @Description TODO
 * @Author 小鹿
 * @Date 2025/5/21 19:59
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResponseDto
{
    private Integer code;
    private Object data;
    private Object msg;

    public static ResponseDto success(Object data){
        return new ResponseDto(200,"成功",data);
    }
    public static ResponseDto fail(Integer code, Object msg){
        return new ResponseDto(code,"错误",msg);
    }
    public static ResponseDto err(Integer code,Object msg){
        return new ResponseDto(code,"失败",msg);
    }
}